﻿using Axiom.Hermetica.WPF.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Axiom.Hermetica.WPF.Views.Windows
{
	public partial class SingleEditorPage : Page
	{
		public ViewModel Model { get { return DataContext as ViewModel; } }

		public SingleEditorPage()
		{
			InitializeComponent();
			Model.GetThumbsAllThumbnailsForItem();
		}

		private void OnImageMouseDown(object sender, MouseButtonEventArgs e)
		{
			if (Model.SelectedItem == null)
			{
				return;
			}
			Model.SelectedItem.Image = Model.SelectedImage;
		}

		private void MenuItem_Click_1(object sender, RoutedEventArgs e)
		{
			Model.SelectedItem.Name = Model.SelectedItem.Name.CamelToTitleCase();
		}
	}
}
